import { createRouter, createWebHistory } from 'vue-router'
import HomePage from '@/pages/HomePage.vue'
import UserLoginPage from '@/pages/User/UserLoginPage.vue'
import UserRegisterPage from '@/pages/User/UserRegisterPage.vue'
import UserManagerPage from '@/pages/admin/UserManagerPage.vue'
import AppManagePage from '@/pages/admin/AppManagePage.vue'
import AppChatPage from '@/pages/app/AppChatPage.vue'
import AppEditPage from '@/pages/app/AppEditPage.vue'
import ChatManagePage from '@/pages/admin/ChatManagePage.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
  {
    path: '/',
    name: '主页',
    component: HomePage,
  },
  {
    path: '/user/login',
    name: '用户登录',
    component: UserLoginPage,
  },
  {
    path: '/user/register',
    name: '用户注册',
    component: UserRegisterPage,
  },
  {
    path: '/admin/userManage',
    name: '用户管理',
    component: UserManagerPage,
  },{
    path: '/admin/appManage',
    name: '应用管理',
    component: AppManagePage,
  },
    {
    path: '/admin/chatManage',
    name: '对话管理',
    component: ChatManagePage,
  },
  {
    path: '/app/chat/:id',
    name: '应用对话',
    component: AppChatPage,
  },
  {
    path: '/app/edit/:id',
    name: '编辑应用',
    component: AppEditPage,
  },
],
})

export default router
